<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>行为验证</title>
    <!-- 引入依赖 -->
    <!--    <link href="../../styles/css/bootstrap.min.css" rel="stylesheet">-->
    <!-- 引入Element必要的依赖文件 -->
    <link rel="stylesheet" href="../../plugins/element-ui/lib/theme-chalk/index.css">
    <link rel="stylesheet" href="../../plugins/aj-captcha/css/verify.css">
    <script src="../../plugins/vue/vue.js"></script>
    <!--    <script src="../../plugins/element-ui/lib/index.js"></script>-->
    <!-- 引入插件 -->
    <!--    <script src="../../api/system/login.js"></script>-->
    <script src="../../plugins/axios/axios.min.js"></script>
    <script src="../../js/request.js"></script>
    <!-- 引入资源end -->
    <!-- 自定义图标 -->
    <link rel="shortcut icon" href="../../images/cloud_logo_2.png"/>

    <script src="../../plugins/aj-captcha/js/jquery.min.js"></script>
    <script src="../../plugins/aj-captcha/js/crypto-js.js"></script>
    <script src="../../plugins/aj-captcha/js/ase.js"></script>
    <script src="../../plugins/aj-captcha/js/verify.js"></script>
</head>
<body>
<div id="app">
    <div id="content"></div>

</div>
</body>
<script>
    // Vue核心对象
    new Vue({
            el: "#div",
            data() {
                return {
                    src: '',
                };
            },
            components: {
                Verify
            },
            //钩子函数，创建页面时被初始化
            created() {
                // 从请求路径获取关联的视频组数据
                this.src = requestUrlParam('mp4')
            },
            //函数集合
            methods: {}
        }
    )
    ;
</script>
<script>
    $('#content').slideVerify({
        baseUrl:'',  //服务器请求地址, 默认地址为安吉服务器;http://localhost:18078
        containerId:'btn',//pop模式 必填 被点击之后出现行为验证码的元素id
        mode:'fixed',     //展示模式
        imgSize : {       //图片的大小对象,有默认值{ width: '310px',height: '155px'},可省略
            width: '400px',
            height: '200px',
        },
        barSize:{          //下方滑块的大小对象,有默认值{ width: '310px',height: '50px'},可省略
            width: '400px',
            height: '40px',
        },
        beforeCheck:function(){  //检验参数合法性的函数  mode ="pop"有效
            let flag = true;
            //实现: 参数合法性的判断逻辑, 返回一个boolean值
            return flag
        },
        ready : function() {},  //加载完毕的回调
        success : function(params) { //成功的回调
            // params为返回的二次验证参数 需要在接下来的实现逻辑回传服务器
            //传递captchaVerification参数在后端进行校验
            parent.login.member.captchaVerification = params.captchaVerification
            //关闭弹窗
            parent.login.dialogVisible = false
            //提交登录数据
            parent.login.handleLogin()
        },
        error : function() {}        //失败的回调
    });
</script>
</html>